<?php
include('../common/config.php');
$conn = new connectDb();
if($_GET['flag'])
{
	$sql = "select name from food_province order by id asc";
	$query = mysql_query($sql);
	while($row = mysql_fetch_array($query))
	{
		$name = $row['name'];
		$sql_p = "select count(id) as num from food_caiji_zccw where area = '$name' order by id asc";
		$query_p = mysql_query($sql_p);
		$row_p = mysql_fetch_array($query_p);
		if($row_p['num'] > 255):
			$row_p['num']= 255;
		endif;
		$num = $row_p['num'];
		$color = "rgb($num,0,0)";
		$name = urlencode($name);
		$data[] = $name.'-'.$color;
	}
echo 	urldecode(json_encode($data));
	

	
}	

?>



